function failLoan() {
	var row = $('#dg').datagrid('getSelected');
	if (row) {
		$.messager.confirm('请确认', '确定要进行流标操作？', function(r) {
			if (r) {
                var urls = '<%=basePath%>/loan/failloan/' + row.id;
                alert(urls);
				$.ajax({
					url : urls,
					success : function(result) {
						var result = eval('(' + result + ')');
						if (result.errorMsg) {
							$.messager.alert('Error',result.errorMsg);
							/*$.messager.show({
								title : 'Error',
								msg : result.errorMsg
							});*/
						} else {
							$('#dg').datagrid('reload');
						}
					}
				});
			}
		});
	}
}
function convertType(value,row,index){
	if(value=='1'){
		return "个人住房贷款";	
	}else if(value=='2'){
		return "个人汽车贷款";
	}else if(value=='3'){
		return "个人教育贷款";
	}else if(value=='4'){
		return "个人消费贷款";
	}else if(value=='5'){
		return "个人医疗贷款";
	}else if(value=='6'){
		return "个人经营类贷款";
	}else if(value=='7'){
		return "周转类贷款";
	}
}
